﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlServerCe;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Kiss.Mobile
{
    public class OrderHandler
    {
        public Customer[] GetCustomersByCity(string city)
        {
            //var q = from c in data.CustomerSet
            //        where c.City.Contains(city)
            //        select c;
            return HandlerHelper.GetObjects<Customer>(string.Format("SELECT * FROM Customers WHERE City LIKE '%{0}%'", city));
        }

        public void UpdateCustomer(Customer customer)
        {
            HandlerHelper.UpdateObject<Customer>(customer, string.Format("SELECT * FROM Customers WHERE CustomerID='{0}'", customer.CustomerID));
        }
    }
}
